package com.example.demo;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created with IntelliJ IDEA.
 * User:xieChao
 * Date:2022/12/1 17:00
 */
@Data
@ConfigurationProperties(prefix = "student") // 读取配置文件中的对象
@Component
public class TestStudent {
    private int id;
    private String name;
    private int age;
}
